﻿using UnityEngine;
using System.Collections;
using System;

public class GraphFunction
{
    private static Func<float, float, float>[] funcs = { SinFunction, MultiSinFunction };

    public static Func<float, float, float>[] GetFunctions => funcs;

    private static float MultiSinFunction(float x, float t)
    {
        float y = Mathf.Sin(Mathf.PI * (x + t));
        y += Mathf.Sin(2f * Mathf.PI * (x + 2f * t)) / 2f;
        y *= 2f / 3f;
        return y;
    }

    private static float SinFunction(float x, float t)
    {
        return Mathf.Sin(Mathf.PI * (x + t));
    }

}

public enum Fun
{
    sin = 0,
    multiSin
}
